import Mock from 'mockjs'

const list = Mock.mock({
  'list|10': [{
    workManualId: '@id',
    workManualNo: '@integer(0, 5000)',
    workManualName: '@csentence(5, 10)',
    workManualType: '@csentence(5)',
    introduction: '@csentence(50)',
    exchangeNote: '@csentence(50)',
    'fileFormat|1': ['.mp4', '.xsl'],
    'isRelease|1': [2, 1],
    'status|1': [2, 1],
    acceptTime: '@datetime',
    orderCost: '@integer(0, 5000)'
  }]
})
const pub = {
  isMore: 0,
  pageIndex: 1,
  pageSize: 10,
  startIndex: 0,
  totalNum: 30,
  totalPage: 1
}
export default [
  // 分页查询作业指导书
  {
    url: '/task/WorkManual/listWorkManualByPage',
    type: 'post',
    response: config => {
      return {
        code: 1,
        data: {
          ...list,
          ...pub
        },
        msg: ''
      }
    }
  },
  // 删除作业指导书
  {
    url: '/task/WorkManual/deleteWorkManualByIds',
    type: 'get',
    response: config => {
      return {
        code: 1,
        data: {},
        msg: ''
      }
    }
  }
]
